/*package unitTests;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

import javax.swing.JTextField;

import mainpackage.Category;
import mainpackage.DataManager;
import mainpackage.Todo;

import org.junit.Test;

import com.sun.xml.internal.bind.v2.TODO;

import ui.AbstractTodoWindow;
import ui.AddTodoPresenter;
import ui.EditTodoPresenter;
import ui.EditTodoWindow;
import ui.MainPresenter;
import ui.MainWindow;

import static org.mockito.Mockito.*;

public class AddTodoPresenterTest {
	
	AbstractTodoWindow mockedAddWindow = mock(AbstractTodoWindow.class);
	AddTodoPresenter addPresenter = new AddTodoPresenter(mockedAddWindow);
	DataManager mockedDataManager = mock(DataManager.class);

	public AddTodoPresenterTest(){
		addPresenter.setDataManager(mockedDataManager);
		
		when(mockedAddWindow.getTitleField()).thenReturn(new JTextField());
		when(mockedAddWindow.getStartField()).thenReturn(new JTextField());
		when(mockedAddWindow.getEndField()).thenReturn(new JTextField());
	}
	
	@Test
	public void todoIsEdited() throws Exception {
		String title = "title";
		String description = "description";
		String start = "2012/12/11 00:00";
		String end = "2012/12/12 00:00";
		String categoryName = mockedAddWindow.getTodoCategory();
		
		Category category = mockedDataManager.addCategory("Category");
		
		Todo todo = new Todo(title, description, start, end, category);
		
		when(mockedAddWindow.getTodoName()).thenReturn(title);
		when(mockedAddWindow.getTodoDesctiption()).thenReturn(description);
		when(mockedAddWindow.getTodoStartTime()).thenReturn(start);
		when(mockedAddWindow.getTodoEndTime()).thenReturn(end);
		when(mockedAddWindow.getTodoCategory()).thenReturn(categoryName);
		
		addPresenter.setDataManager(mockedDataManager);
		
		addPresenter.saveButtonClicked();
		verify(mockedDataManager).addTodo(todo);
		verify(mockedAddWindow).dispose();
		
	}
}*/
